package com.woniu.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * interview
 * @author 
 */
public class Interview implements Serializable {
    /**
     * 面试编号
     */
    private Integer ino;

    /**
     * 学生
     */
    private Integer sid;

    /**
     * 面试结果
     */
    private String result;

    /**
     * 评价
     */
    private String judge;

    /**
     * 面试时间
     */
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
    private Date itime=new Date();
    private Student student;
    private static final long serialVersionUID = 1L;

    public Integer getIno() {
        return ino;
    }

    public void setIno(Integer ino) {
        this.ino = ino;
    }

    public Integer getSid() {
        return sid;
    }

    public void setSid(Integer sid) {
        this.sid = sid;
    }

    public String getResult() {
        return result;
    }

    public void setResult(String result) {
        this.result = result;
    }

    public String getJudge() {
        return judge;
    }

    public void setJudge(String judge) {
        this.judge = judge;
    }

    public Date getItime() {
        return itime;
    }

    public void setItime(Date itime) {
        this.itime = itime;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Interview other = (Interview) that;
        return (this.getIno() == null ? other.getIno() == null : this.getIno().equals(other.getIno()))
            && (this.getSid() == null ? other.getSid() == null : this.getSid().equals(other.getSid()))
            && (this.getResult() == null ? other.getResult() == null : this.getResult().equals(other.getResult()))
            && (this.getJudge() == null ? other.getJudge() == null : this.getJudge().equals(other.getJudge()))
            && (this.getItime() == null ? other.getItime() == null : this.getItime().equals(other.getItime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getIno() == null) ? 0 : getIno().hashCode());
        result = prime * result + ((getSid() == null) ? 0 : getSid().hashCode());
        result = prime * result + ((getResult() == null) ? 0 : getResult().hashCode());
        result = prime * result + ((getJudge() == null) ? 0 : getJudge().hashCode());
        result = prime * result + ((getItime() == null) ? 0 : getItime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", ino=").append(ino);
        sb.append(", sid=").append(sid);
        sb.append(", result=").append(result);
        sb.append(", judge=").append(judge);
        sb.append(", itime=").append(itime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}